<html>
    <head>
        <link rel="shortcut icon" href="images/icon.png" />
        <title>Atlas</title>

        <link rel="stylesheet" href="css/leaflet.less" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.1.custom.min.js"></script>  
        <script>
            function send_mail(){
                $('#send_but').attr('disabled', 'disabled');
                $('#loader').show();
                var text = $("#text").val();
                var checked_alpha = $('#alpha_sms').attr('checked');
                var checked_kyivstar = $('#kyivstar_sms').attr('checked');
                var checked_email = $('#email').attr('checked');
                var checked_motokiev = $('#motokiev').attr('checked');
                var s = $.ajax({  

                                        type:'POST',
                                        dataType: 'json',
                                        data: {
                                            text:        text,
                                            alpha:       checked_alpha,
                                            kyivstar:    checked_kyivstar,
                                            email:       checked_email,
                                            motokiev:    checked_motokiev
                                        },
                                        url:'../alpha/alpha.php',
                                        async: false,
                                        success: function (data){
                                                alert(data.msg); 
                                                $('#loader').hide();
                                                $('#send_but').removeAttr('disabled');
                                        },
                                        fail: function (data){
                                                alert(data.msg);
                                                $('#loader').hide();
                                                $('#send_but').removeAttr('disabled');
                                        }

                }).responseText;
                $('#loader').hide();
                $('#send_but').removeAttr('disabled');
            }
        </script>
    </head>
    <body id ="index">
        <div id="loader" class="loader" style="display:none;">
            <img id="img-loader" src="images/ajax-loader.gif" alt="Loading..."/>
        </div>
        <div  align = "center" id="index1" style=" width: 400px; box-shadow: 0px 0px 10px #ffffff;   position:absolute;

              left:35%;
              margin-top:80px;
              margin-left:-200px;" >
            <p style="margin: 10px"> <img src="images/mainlogo.png"  ></p>
            <form method="post">
                <label><input type="checkbox" id="alpha_sms" checked="checked">alpha_sms</label><br/>
                <label><input type="checkbox" id="kyivstar_sms" checked="checked">kyivstar_sms</label><br/>
                <label><input type="checkbox" id="email" checked="checked">e-mail</label><br/>
                <label><input type="checkbox" id="motokiev" checked="checked">moto.kiev.ua</label><br/>
                <label>Текст рассылки:</label><br>
                <textarea id="text" maxlength="160" style="width: 300px; height:100px; multiline:true;"></textarea>
            </form>
            <input type="button" id="send_but" onclick="send_mail()" style="height: 25px;  width: 80px; margin-top: 5px" value="Отправить"/>
<!--            <div class="button" id="send_but" onclick="send_mail()" style="height: 25px;  width: 80px; margin-top: 5px" disabled="disabled">
                <p style=" margin-top: 5px">Отправить</p>
            </div>-->

            <div style="margin: 10px; font-size: 10px;" >
                Help: <a href="skype:kardinal.maxim?chat">Skype</a>
            </div>
            <div style="margin: 10px; font-size: 10px;" >
                <a href="note_registration.html" target="blank" >Instructions for registration</a >

            </div>
        </div>
    </body>
</html>